package com.code.google.mdsc.io.xml.impl.factory;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;

import com.code.google.mdsc.exception.XMLGeneratorException;
import com.code.google.mdsc.sepa.ObjectFactory;

/**
 * 
 *
 */
public abstract class PartialSEPAFactory {

	protected static final ObjectFactory OBJECT_FACTORY = new ObjectFactory();

	protected DatatypeFactory datatypeFactory = null;

	public PartialSEPAFactory() {
		if (datatypeFactory == null) {
			try {
				datatypeFactory = DatatypeFactory.newInstance();
			} catch (DatatypeConfigurationException e) {
				throw new XMLGeneratorException(e,
						"cannot create data type factory");
			}
		}
	}
}
